package com.example.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.common.to.es.SkuHasStockTo;
import com.common.utils.PageUtils;
import com.example.ware.entity.WmsWareSkuEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author WDL
 * @email 2329156214@QQ.com
 * @date 2022-05-01 16:31:00
 */
public interface WmsWareSkuService extends IService<WmsWareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPageBySkuIdAndWare(Map<String, Object> params);

    void addStock(Long skuId, Long wareId, Integer skuNum);

    /**
     * 查询skuIds中对应的sku是否有库存
     *
     * @param skuIds 查询的所有skuId
     * @return
     */
    List<SkuHasStockTo> hasStock(List<Long> skuIds);
}

